import { http } from "@/utils/http";

export type commonResult<T> = {
    code: number;
    msg: string;
    result: T;
};
/** 1.6.1配置列表 */
const configList = "/system/system/v2/config/list";
/** 1.6.2 配置详情 */
const configInfo = "/system/system/v2/config/info";
/** 1.6.3 保存配置 */
const configSave = "/system/system/v2/config/save";

export const getConfigList = (params?: object) => {
    return http.request<commonResult<any>>("get", configList, {
        params
    });
};
export const getConfigInfo = (params?: object) => {
    return http.request<commonResult<any>>("get", configInfo, {
        params
    });
};
export const saveConfigs = (data?: object) => {
    return http.request<commonResult<any>>("put", configSave, {
        data
    });
};
